package com.example.springboot_rabbitmq.direct;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MessageListener {
    @RabbitListener(queues = "direct_queue")
    public void receive(String id) {
        System.out.println("已完成短信发送业务(rabbitmq direct),direct_queue，id：" + id);
    }

    @RabbitListener(queues = "direct_queue2")
    public void receive2(String id) {
        System.out.println("已完成短信发送业务(rabbitmq direct),direct_queue2，id：" + id);
    }

}
